unit Form_Main;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, RzButton, Vcl.ExtCtrls, RzPanel,rtcInfo,
  Vcl.StdCtrls, RzTabs, RzRadChk,Modl_HTTP, UniProvider, SQLServerUniProvider,
  Dialog_View;

type
  TFormMain = class(TDialogView)
    RzToolbar1: TRzToolbar;
    Btnx_1: TRzToolButton;
    Btnx_2: TRzToolButton;
    Btnx_3: TRzToolButton;
    Btnx_4: TRzToolButton;
    RzPageControl1: TRzPageControl;
    TabSheet1: TRzTabSheet;
    TabSheet2: TRzTabSheet;
    RzToolbar2: TRzToolbar;
    RzCheckBox1: TRzCheckBox;
    SQLServerUniProvider1: TSQLServerUniProvider;
    procedure Btnx_1Click(Sender: TObject);
    procedure Btnx_2Click(Sender: TObject);
    procedure Btnx_3Click(Sender: TObject);
    procedure Btnx_4Click(Sender: TObject);
    procedure RzCheckBox1Click(Sender: TObject);
  private
  protected
    procedure SetInitialize;override;
    procedure SetCommParams;override;
    procedure SetGridParams;override;
    procedure SetComboItems;override;
    procedure TryFreeAndNil;override;
  public
  end;

var
  FormMain: TFormMain;

implementation
uses
  Winapi.ShellAPI;

{$R *.dfm}

procedure TFormMain.Btnx_1Click(Sender: TObject);
begin
  ShellExecute(0,'open',PChar(AppFileName),'/INSTALL',nil,SW_SHOW);
end;

procedure TFormMain.Btnx_2Click(Sender: TObject);
begin
  ShellExecute(0,'open',PChar(AppFileName),'/UNINSTALL',nil,SW_SHOW);
end;

procedure TFormMain.Btnx_3Click(Sender: TObject);
begin
  WinExec('net start srvrhygl',SW_SHOW);
end;

procedure TFormMain.Btnx_4Click(Sender: TObject);
begin
  WinExec('net stop srvrhygl',SW_SHOW);
end;

procedure TFormMain.RzCheckBox1Click(Sender: TObject);
begin
  if TRzCheckBox(Sender).Checked then
  begin
    ModlHttp.Start;
  end else
  begin
    ModlHttp.Stop;
  end;
end;

procedure TFormMain.SetComboItems;
begin
  inherited;

end;

procedure TFormMain.SetCommParams;
begin
  inherited;

end;

procedure TFormMain.SetGridParams;
begin
  inherited;

end;

procedure TFormMain.SetInitialize;
begin
  inherited;

end;

procedure TFormMain.TryFreeAndNil;
begin
  inherited;

end;

end.
